package cyou.breathe.blog.user.infrastructure.exception;

import cyou.breathe.blog.base.exception.ErrorCode;

/**
 * @author: breathe
 * @createTime: 2025-08-27
 */
public enum UserErrorCode implements ErrorCode {
    USER_REGISTER_PARAM_ERROR("USER_REGISTER_PARAM_ERROR", "用户注册参数错误"),
    DUPLICATE_TELEPHONE_NUMBER("DUPLICATE_TELEPHONE_NUMBER", "手机号已存在"),
    DUPLICATE_EMAIL_NUMBER("DUPLICATE_EMAIL_NUMBER", "邮箱已存在"),
    USER_OPERATE_FAILED("USER_OPERATE_FAILED", "用户操作失败"),
    USER_NOT_EXIST("USER_NOT_EXIST", "用户不存在"),
    USER_STATE_IS_NOT_ACTIVE("USER_STATE_IS_NOT_ACTIVE", "用户状态无效"),
    USER_STATUS_CANT_OPERATE("USER_STATUS_CANT_OPERATE", "用户状态不能进行操作"),
    NICK_NAME_EXIST("NICK_NAME_EXIST", "昵称已存在"),
    USER_PASSWD_CHECK_FAIL("USER_PASSWD_CHECK_FAIL", "密码校验失败"),
    USER_UPLOAD_PICTURE_FAIL("USER_UPLOAD_PICTURE_FAIL", "用户上传图片失败"),
    ;

    private String code;

    private String message;

    UserErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
